using Avalonia;
using Avalonia.Controls;


namespace NDY_1.ContentDialogs;

public partial class CloseWindowDialog : Window
{
    public CloseWindowDialog()
    {
        InitializeComponent();
        BtnYes.Click += (sender, args) =>
        {
            Message = "Yes";
            this.Close();
        };
        BtnNo.Click += (sender, args) =>
        {
            Message = "No";
            this.Close();
        };
    }

    public static readonly StyledProperty<string> MessageProperty =
        AvaloniaProperty.Register<CloseWindowDialog, string>(nameof(Message));

    public string Message {
        get => GetValue(MessageProperty);
        set => SetValue(MessageProperty, value);
    }
    
}